/**
 * 
 * 注册js
 * 
 */

function checkRegister() {

	var email = $.trim($("#email").val());
	if (email == '') {
		$("#email_desc").html("<ul class=\"errorlist\"><li>你还没有填写电子邮箱哦。</li></ul>");
		return false;
	}else{
		$("#email_desc").html("");
	}

	if (!IsEmail(email)) {
		$("#email_desc").html("<ul class=\"errorlist\"><li>电子邮箱格式不正确哦。</li></ul>");
		return false;
	}

	var nickname = $.trim($("#nickname").val());
	if (nickname == '') {
		$("#nickname_desc").html("<ul class=\"errorlist\"><li>你还没有填写昵称哦。</li></ul>");
		return false;
	}else{
		$("#nickname_desc").html("");
	}

	var password = $.trim($("#password").val());
	if (password == '') {
		$("#password_desc").html("<ul class=\"errorlist\"><li>你还没有填写密码哦。</li></ul>");
		return false;
	}else{
		$("#password_desc").html("");
	}

	var confirm_password = $.trim($("#confirm_password").val());
	
	if (confirm_password == '') {
		$("#confirm_password_desc").html("<ul class=\"errorlist\"><li>请再输入一次密码。</li></ul>");
		return false;
	}else{
		$("#confirm_password_desc").html("");
	}
	
	if (password != confirm_password) {
		$("#confirm_password_desc").html("<ul class=\"errorlist\"><li>两次输入的密码不一致。</li></ul>");
		return false;
	}else{
		$("#confirm_password_desc").html("");
	}

	return true;
}